#define _CRT_SECURE_NO_WARNINGS 1
/**
 * Note: The returned array must be malloced, assume caller calls free().
 */
int* findErrorNums(int* nums, int numsSize, int* returnSize) {
    int* arr = (int*)malloc(sizeof(int) * 2);
    *returnSize = 2;
    int i = 0;
    int j = 0;
    for (i = 1; i <= numsSize; i++)
    {
        int flag = 0;
        for (j = 0; j < numsSize; j++)
        {
            if (i == nums[j])
            {
                flag++;
            }
        }
        if (flag == 0)
        {
            arr[1] = i;
        }
        if (flag == 2)
        {
            arr[0] = i;
        }
    }
    printf("nihao");
    return arr;
}


